<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<html>
<head>
    <title>房屋信息管理</title>
    <meta name="decorator" content="ani"/>
    <script type="text/javascript">

        $(document).ready(function () {
            jp.ajaxForm("#inputForm", function (data) {
                if (data.success) {
                    jp.success(data.msg);
                } else {
                    jp.error(data.msg);
                    $("#inputForm").find("button:submit").button("reset");
                }
            });

        });
    </script>
</head>
<body>
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-primary">
                <div class="panel-body">
                    <form:form id="inputForm" modelAttribute="ipmpHouseinfo"
                               action="${ctx}/ipmp/houseinfo/ipmpHouseinfo/save" method="post" class="form-horizontal">
                        <form:hidden path="id"/>
                        <form:hidden path="buildingid"/>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>房屋类型：</label>
                            <div class="col-sm-10">
                                <form:radiobuttons path="housetype" items="${fns:getDictList('house_type')}"
                                                   itemLabel="label" itemValue="value" htmlEscape="false"
                                                   class="i-checks required"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>区域：</label>
                            <div class="col-sm-10">
                                <form:input path="area" htmlEscape="false" class="form-control required"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>单元号：</label>
                            <div class="col-sm-10">
                                <form:input path="unit" htmlEscape="false" class="form-control required"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>业主：</label>
                            <div class="col-sm-10">
                                <sys:userselect id="houseowner" name="houseowner.id"
                                                value="${ipmpHouseinfo.houseowner.id}" labelName="houseowner.name"
                                                labelValue="${ipmpHouseinfo.houseowner.name}"
                                                cssClass="form-control required"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><font color="red">*</font>备注：</label>
                            <div class="col-sm-10">
                                <form:input path="remarks" htmlEscape="false" class="form-control required"/>
                            </div>
                        </div>
                        <c:if test="${mode == 'add' || mode=='edit'}">
                            <div class="col-lg-3"></div>
                            <div class="col-lg-6">
                                <div class="form-group text-center">
                                    <div>
                                        <button class="btn btn-primary btn-block btn-lg btn-parsley"
                                                data-loading-text="正在提交...">提 交
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </c:if>
                    </form:form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>